<template>
<!--我的动态-->
  <div v-if="dynamicInfo">
    <ul>
      <li v-for="(val,index) in dynamicInfo" :key='index'>
        <dynamicShow :dynameicData='val'/>
      </li>
    </ul>
      
  </div>
</template>

<script>
import require from "requests/index";
import dynamicShow from 'components/business/dynamicShow'
export default {
  name:'dynamic',
  data(){
    return {
      dynamicInfo:null
    }
  },
  components:{
    dynamicShow
  },
   methods:{
    getDynamic(){
      require.getDynamic(this.$store.state.userId).then(res=>{
        this.dynamicInfo=res.data.events
        //console.log(this.dynamicInfo)
      })
    }
  },
  mounted(){
    this.getDynamic()
  }
}
</script>

<style>

</style>